Optimal. Leaf size=57 \[ a \sin (c) \text{CosIntegral}(d x)+a \cos (c) \text{Si}(d x)+\frac{2 b x \sin (c+d x)}{d^2}+\frac{2 b \cos (c+d x)}{d^3}-\frac{b x^2 \cos (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.114928, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.353, Rules used = {3339, 3303, 3299, 3302, 3296, 2638} \[ a \sin (c) \text{CosIntegral}(d x)+a \cos (c) \text{Si}(d x)+\frac{2 b x \sin (c+d x)}{d^2}+\frac{2 b \cos (c+d x)}{d^3}-\frac{b x^2 \cos (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3339
Rule 3303
Rule 3299
Rule 3302
Rule 3296
Rule 2638
Rubi steps
\begin{align*} \int \frac{\left (a+b x^3\right ) \sin (c+d x)}{x} \, dx &=\int \left (\frac{a \sin (c+d x)}{x}+b x^2 \sin (c+d x)\right ) \, dx\\ &=a \int \frac{\sin (c+d x)}{x} \, dx+b \int x^2 \sin (c+d x) \, dx\\ &=-\frac{b x^2 \cos (c+d x)}{d}+\frac{(2 b) \int x \cos (c+d x) \, dx}{d}+(a \cos (c)) \int \frac{\sin (d x)}{x} \, dx+(a \sin (c)) \int \frac{\cos (d x)}{x} \, dx\\ &=-\frac{b x^2 \cos (c+d x)}{d}+a \text{Ci}(d x) \sin (c)+\frac{2 b x \sin (c+d x)}{d^2}+a \cos (c) \text{Si}(d x)-\frac{(2 b) \int \sin (c+d x) \, dx}{d^2}\\ &=\frac{2 b \cos (c+d x)}{d^3}-\frac{b x^2 \cos (c+d x)}{d}+a \text{Ci}(d x) \sin (c)+\frac{2 b x \sin (c+d x)}{d^2}+a \cos (c) \text{Si}(d x)\\ \end{align*}
Mathematica [A] time = 0.197216, size = 50, normalized size = 0.88 \[ a \sin (c) \text{CosIntegral}(d x)+a \cos (c) \text{Si}(d x)+\frac{b \left (\left (2-d^2 x^2\right ) \cos (c+d x)+2 d x \sin (c+d x)\right )}{d^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.008, size = 112, normalized size = 2. \begin{align*}{\frac{ \left ({c}^{2}+c+1 \right ) b \left ( - \left ( dx+c \right ) ^{2}\cos \left ( dx+c \right ) +2\,\cos \left ( dx+c \right ) +2\, \left ( dx+c \right ) \sin \left ( dx+c \right ) \right ) }{{d}^{3}}}-3\,{\frac{cb \left ( 1+c \right ) \left ( \sin \left ( dx+c \right ) - \left ( dx+c \right ) \cos \left ( dx+c \right ) \right ) }{{d}^{3}}}-3\,{\frac{{c}^{2}b\cos \left ( dx+c \right ) }{{d}^{3}}}+a \left ({\it Si} \left ( dx \right ) \cos \left ( c \right ) +{\it Ci} \left ( dx \right ) \sin \left ( c \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 2.74673, size = 103, normalized size = 1.81 \begin{align*} \frac{{\left (a{\left (-i \,{\rm Ei}\left (i \, d x\right ) + i \,{\rm Ei}\left (-i \, d x\right )\right )} \cos \left (c\right ) + a{\left ({\rm Ei}\left (i \, d x\right ) +{\rm Ei}\left (-i \, d x\right )\right )} \sin \left (c\right )\right )} d^{3} + 4 \, b d x \sin \left (d x + c\right ) - 2 \,{\left (b d^{2} x^{2} - 2 \, b\right )} \cos \left (d x + c\right )}{2 \, d^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.70361, size = 221, normalized size = 3.88 \begin{align*} \frac{2 \, a d^{3} \cos \left (c\right ) \operatorname{Si}\left (d x\right ) + 4 \, b d x \sin \left (d x + c\right ) - 2 \,{\left (b d^{2} x^{2} - 2 \, b\right )} \cos \left (d x + c\right ) +{\left (a d^{3} \operatorname{Ci}\left (d x\right ) + a d^{3} \operatorname{Ci}\left (-d x\right )\right )} \sin \left (c\right )}{2 \, d^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 4.84729, size = 85, normalized size = 1.49 \begin{align*} a \sin{\left (c \right )} \operatorname{Ci}{\left (d x \right )} + a \cos{\left (c \right )} \operatorname{Si}{\left (d x \right )} + b x^{2} \left (\begin{cases} - \cos{\left (c \right )} & \text{for}\: d = 0 \\- \frac{\cos{\left (c + d x \right )}}{d} & \text{otherwise} \end{cases}\right ) - 2 b \left (\begin{cases} - \frac{x^{2} \cos{\left (c \right )}}{2} & \text{for}\: d = 0 \\- \frac{\begin{cases} \frac{x \sin{\left (c + d x \right )}}{d} + \frac{\cos{\left (c + d x \right )}}{d^{2}} & \text{for}\: d \neq 0 \\\frac{x^{2} \cos{\left (c \right )}}{2} & \text{otherwise} \end{cases}}{d} & \text{otherwise} \end{cases}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]